package org.com.action.user;

import org.com.common.LogInfo;
import org.com.dao.RegistDao;
import org.com.domain.User;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;

@SuppressWarnings("serial")
public class UserUpdateAction extends ActionSupport implements Preparable, ModelDriven<User> {
	
	User user;
	RegistDao dao;

	
	public void prepare() throws Exception {
		user = new User();
		dao = new RegistDao();
		
	}

	public String execute() throws Exception {
		dao.updateUser(user);
		LogInfo.getLogMessageInfo("USER UPDATE COMPLETE!!");
		LogInfo.getLogClassInfo(UserUpdateAction.class);
		
		return SUCCESS;
	}

	public User getModel() {

		return user;
	}

}
